package com.waexample.jmsmailosgi;

import org.apache.camel.LoggingLevel;
import org.apache.camel.builder.RouteBuilder;

public class JmsMailRouter extends RouteBuilder {

    @Override
    public void configure() throws Exception {

        from("jms:TESTQUEUE")
                .setBody().simple("JMS MESSAGE FROM TESTQUEUE :${body}")
                .setHeader("subject", constant("Apache Camel-Test Mail"))
                .log(LoggingLevel.INFO, "JMS LOGS", "JMS MESSAGE :${body}")
                .to("smtp://mail.waexample.co.in:25?username=test@waexample.co.in&password=musu30in&to=test1@waexample.co.in&from=test@waexample.co.in");
    }
}
